package com.lwy.controller;

import com.lwy.entity.BookCategory;
import com.lwy.service.impl.BookCategoryServiceImpl;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
//分类controller
@RestController
@RequestMapping("cate")
public class BookCategoryController {
//    调用service实现类
    @Resource
    private BookCategoryServiceImpl categoryService;
//    查询章节
    @RequestMapping("list")
    public List<BookCategory> list(){
        return categoryService.list();
    }

    @RequestMapping("findList")
    public List<BookCategory> findList(){
        return categoryService.findList();
    }
}
